{% extends 'base/layout.html' %}


{% block html_base_attr %}
  data-spy="scroll"
  data-target="#search-result-list"
{% endblock %}

{% block content_header %}

{% block content_header_before %}
{% endblock %}

<div class="header-wrap">
  <header id="page-header" class="{% if page %}has-page{% endif %}">

    <div class="d-flex align-items-center">
      <div class="title-container">
        <h1 class="title" id="revision-path"></h1>
        {% if page and not forbidden and not isTrashPage() %}
          <div id="tag-label"></div>
        {% endif %}
      </div>
      {% include '../widget/header-buttons.html' %}
    </div>

  </header>
</div>

{% endblock %}

{% block content_main %}

  {% block content_main_before %}
  {% endblock %}

  {# page-list-search should be fully managed by react.js,
  # but now the header and page list content is rendered separately by the server,
  # so now bind the values through the hidden fields.
  #}
  {% if false %} {# Disable temporaly -- 2018.03.08 Yuki Takei #}
  {% if isSearchServiceConfigured() && !isTopPage() && !isTrashPage() %}
  <div id="page-list-search">
  </div>
  {% endif %}
  {% endif %}

  <div>
    {% include '../widget/page_content.html' %}
  </div>

  <div class="row page-list hidden-print {% if page.isPortal() %}m-t-30{% endif %}">
    <div class="col-md-12">
      {% include '../widget/page_list_and_timeline.html' %}
    </div>
  </div>

{% endblock %}


{% block content_main_after %}
{% endblock %}


{% block content_footer %}
<footer>
</footer>
{% endblock %}


{% block side_header %}

{% if not page and not isUserPageList(path) and !isTrashPage() %}
  {% include '../widget/create_portal.html' %}
{% else %}
  {% include 'widget/page_side_header.html' %}
{% endif %}

{% endblock %} {# side_header #}

{% block body_end %}
<div id="crowi-modals">
  {% include '../modal/what_is_portal.html' %}
  {% include '../modal/unportalize.html' %}
</div>
{% endblock %} {# body_end #}
